Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always enable storage image usage for non-RTV 2D images #1806

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

doitsujin
Copy link
Collaborator

@doitsujin doitsujin commented Dec 8, 2023

Needed for multisample resolve in some cases, but this is scary and needs testing on a wide range of hardware.

Builds on #1805.

This allows multisample resolves to be performed on resources which
do not support render target usage.

Signed-off-by: Philip Rebohle <[email protected]>
@HansKristian-Work
Copy link
Owner

Asked an NV dev and they suggested this won't change anything for them.

@@ -774,6 +774,16 @@ static HRESULT vkd3d_get_image_create_info(struct d3d12_device *device,
if (!(desc->Flags & D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE) || desc->SampleDesc.Count > 1)
image_info->usage |= VK_IMAGE_USAGE_SAMPLED_BIT;

/* Add storage image usage if the image cannot be rendered to, but may
* be used as a destination image for multisample resolves. */
if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D && desc->SampleDesc.Count == 1 &&

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be safe to land this if we check for AMD or NVIDIA for now. I'm still concerned about e.g. Intel/Turnip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants